{layout name="common/layout" /}

<div class="container" id="content-container">

    <div class="row">

        <main class="col-xs-12">

            <div class="panel panel-default article-content">
                <div class="panel-heading">
                    <ol class="breadcrumb">
                        <!-- S 面包屑导航 -->
                        {cms:breadcrumb id="item"}
                        <li><a href="{$item.url}">{$item.name}</a></li>
                        {/cms:breadcrumb}
                        <li>详情</li>
                        <!-- E 面包屑导航 -->
                    </ol>
                </div>
                <div class="panel-body">
                    <div class="article-metas">
                        {foreach name="fieldsList" id="item"}
                        {php}if(in_array($item['name'], ['id', 'user_id', 'createtime', 'updatetime', 'memo', 'status']) || !isset($__DIYDATA__[$item['name']])) continue;{/php}
                        <div class="row">
                            <div class="col-xs-6 col-sm-4 col-md-2 text-right"><p>{:$item['title']}：</p></div>
                            <div class="col-xs-6 col-sm-8 col-md-10">
                                {if $item['type']=='image' || $item['type']=='images'}
                                    {php}$imageList = explode(',', $__DIYDATA__[$item['name']]);{/php}
                                    {if $imageList}
                                    <div class="related-article mb-2">
                                    <div class="row mt-2">
                                        {foreach name="imageList" id="image"}
                                        <div class="col-xs-6 col-sm-3 col-md-2">
                                            <div class="embed-responsive embed-responsive-4by3 img-zoom">
                                                <a href="{$image}" target="_blank"><img src="{$image}" alt=""></a>
                                            </div>
                                        </div>
                                        {/foreach}
                                    </div>
                                    </div>
                                    {/if}
                                {else/}
                                    <p>{:$__DIYDATA__[$item['name']]}</p>
                                {/if}
                            </div>
                        </div>
                        {/foreach}

                        <div class="row">
                            <div class="col-xs-6 col-sm-4 col-md-2 text-right"><p>添加时间：</p></div>
                            <div class="col-xs-6 col-sm-8 col-md-10">
                                <p>{$__DIYDATA__.createtime|datetime}</p>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-xs-6 col-sm-4 col-md-2 text-right"><p>状态：</p></div>
                            <div class="col-xs-6 col-sm-8 col-md-10">
                                <p>{$__DIYDATA__.status_text}</p>
                            </div>
                        </div>
                        {if  $user && $user.id==$__DIYDATA__.user_id && $__DIYDATA__.status=='rejected'}
                        <div class="row">
                            <div class="col-xs-6 col-sm-4 col-md-2 text-right"><p>拒绝原因：</p></div>
                            <div class="col-xs-6 col-sm-8 col-md-10">
                                <p class="text-danger">{$__DIYDATA__.memo}</p>
                            </div>
                        </div>
                        {/if}

                        <div class="row">
                            <div class="col-xs-6 col-sm-4 col-md-2 text-right"></div>
                            <div class="col-xs-6 col-sm-8 col-md-10">
                                <p>
                                {if $user && $user.id==$__DIYDATA__.user_id && $__DIYFORM__.isedit}
                                <a href="{$__DIYFORM__.posturl}?id={$__DIYDATA__.id}" class="btn btn-danger"><i class="fa fa-pencil"></i> 修改</a>
                                {/if}
                                <a href="{$__DIYFORM__.url}" class="btn btn-default"><i class="fa fa-reply"></i> 返回</a>
                                </p>
                            </div>
                        </div>
                    </div>


                    <div class="social-share text-center mt-3 mb-1" data-initialized="true" data-mode="prepend">
                        <a href="javascript:;" class="social-share-icon icon-heart addbookbark"></a>
                        <a href="#" class="social-share-icon icon-weibo" target="_blank"></a>
                        <a href="#" class="social-share-icon icon-qq" target="_blank"></a>
                        <a href="#" class="social-share-icon icon-qzone" target="_blank"></a>
                        <a href="#" class="social-share-icon icon-wechat"></a>
                    </div>

                    <div class="clearfix"></div>
                </div>
            </div>

        </main>

    </div>
</div>
